#pragma once
#include"HashTbale.h"
namespace lqy
{


	template<class K, class Hash = HashFunc<K>>
	class unordered_set
	{
		struct SetKeyOfT
		{
			const K& operator()(const K&key)
			{
				return key;
			}

		};
		typedef typename hash_bucket::HashTable<K, const K, SetKeyOfT, Hash>::Iterator iterator;
		typedef typename hash_bucket::HashTable<K, const K, SetKeyOfT, Hash>::const_Iterator const_iterator;
	public:
		iterator begin()
		{
			return _ht.Begin();
		}
		iterator end()
		{
			return _ht.End();
		}
		iterator Find(const K& key)
		{
			return _ht.Find(key);
		}
		pair<iterator, bool> Insert(const K&key)
		{
			return _ht.Insert(key);
		}
		bool Erase(const K& key)
		{
			return _ht.Erase(key);
		}
		

	private:
		hash_bucket::HashTable<K, const K, SetKeyOfT, HashFunc<K> >_ht;
	};
}
